package com.wql.rabbitmq.study;

import com.rabbitmq.client.Channel;
import com.rabbitmq.client.MessageProperties;
import com.wql.rabbitmq.ChannelFactory;
import com.wql.rabbitmq.Constant;

public class TaskTestForProducter {

	public static void main(String[] args) throws Exception {
		Channel channel = ChannelFactory.getChannel();
		channel.queueDeclare(Constant.TASK_NAME, true, false, false, null);
		String msg = "hello world";
		for (int i = 0; i < 10; i++)
			channel.basicPublish("", Constant.TASK_NAME, MessageProperties.PERSISTENT_TEXT_PLAIN, msg.getBytes());
	}

}
